Image scaling is a common image processing technology, and the scaling is rather difficult if the source image and the target image have different aspect ratios. With the aspect ratios being different, distortion occurs when the source image is scaled up or down to the target image, especially when the aspect ratio of the source image is sharply different from that of the target image.
A typical scenario of image scaling is the adaptation between an image with a 4:3 aspect ratio and an image with a 16:9 aspect ratio. Currently, the video communication system needs to be compatible with both the standard-definition image (such as 4CIF) with the existing aspect ratio of 4:3 and the high-definition image (such as 720p and 1080p) with a new aspect ratio of 16:9. The traditional Cathode Ray Tube (CRT) television sets generally employ an aspect ratio of 4:3, and the latest high-definition Liquid Crystal Display (LCD) television sets generally employ an aspect ratio of 16:9. Therefore, there is a problem as regards how to scale a standard-definition video image with an aspect ratio of 4:3 to an image presentable on a high-definition television set with an aspect ratio of 16:9, and vice versa.
The prior art puts forward many solutions to the foregoing problem to implement scaling between images with different aspect ratios, for example, linear scaling, edge trimming, horizontal nonlinear scaling, and filling of black edges of images. However, in the process of implementing the present invention, the inventor finds at least the following problems in the prior art.
When images are scaled through linear scaling, the method is simple, but distortion of images is serious. When images are scaled through edge trimming, the distortion of images is avoided, but the main objects of the images are vulnerable to loss. When the black edge of an image is filled in the scaling process, the scaled image is smaller than the source image, and it is impossible to fill the whole display area. The filling of the black edge leads to interference to the audience. When an image is scaled through a horizontal nonlinear scaling algorithm, if the main objects in the image are in the middle of the image, the main object area is little distorted after the scaling, and the visual effect is good; however, if the main objects (such as persons) exist on the edge of the image, the persons at the edge are distorted sharply against the persons in the middle of the image after the image scaling, and the visual effect is deteriorated. Meanwhile, if objects are moving horizontally, for example, captions which scroll horizontally or persons who walk horizontally, the captions or persons crossing areas are distorted sharply, and the audience is sensitive to such distortion.